<template>
	<view>
		<!-- 页面标题头begin -->
		<view class="smart-page-head">
			<view class="smart-page-head-title">progress进度条</view>
		</view>
		<!-- 页面标题头end -->
		<view class="main">
			<progress :percent="p" active="true" activeColor="#4CD964" stroke-width="20" show-info="true"></progress>
		</view>
		<button type="primary" @click="setProgress()">设置</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				p:50
			}
		},
		methods: {
			// 设置进度条事件
			setProgress(){
				console.log('setting。。。')
				this.p=80;
			}
		}
	}
</script>

<style>
.smart-page-head {
		padding: 20px 0;
		text-align: center;
		margin-bottom: 20px;
	}

	.smart-page-head-title {
		font-size: 24px;
		font-weight: 600;
		color: darkgray;
		display: inline-block;
		position: relative;
		padding-bottom: 8px;
	}

	.smart-page-head-title::after {
		content: '';
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 2px;
		background-color: lightgray;
	}
	.main{
		padding: 20px;
	}
</style>
